let { ipcMain } = require('electron')

ipcMain.on('sendMain', (e, data) => {
  console.log('data 1', data)

  e.sender.send('replyRender', {
    id: '456789',
    content: '主进程回复渲染进程的消息'
  })
})

ipcMain.on('sendMainSync', (e, data) => {
  console.log('data sync', data)

  e.returnValue = {
    id: '789456',
    content: '回复同步消息'
  }
})